package LC0070;

public class Solution1 {
    // 数组 + 动态规划
    public int climbStairs(int n) {
        int[] plans = new int[n+1];
        plans[0] = 1;
        plans[1] = 1;

        for (int i = 2; i < n+1; i++){
            plans[i] = plans[i-1] + plans[i-2];
        }

        return plans[n];
    }
}
